package cn.qing.util;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class EncodeUtil {
    public static final BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();

    public static String encode(String password){
        String passwordencode = encoder.encode(password);
        //123
        //$2a$10$3M7wPUYzozcRBL2MOj3hJOs35HteuNsYRxvD5uR1Wrn9s2jIcM3ve
        return passwordencode;
    }

    /*public static void main(String[] args) {
        String str = "123";
        System.out.println(EncodeUtil.encode(str));
        //$2a$10$3M7wPUYzozcRBL2MOj3hJOs35HteuNsYRxvD5uR1Wrn9s2jIcM3ve
    }*/
}
